<%
  #get the report class element
  reportClasses=""
  @report.reporttags.each { |reporttag|
    reportClasses=reporttag.css_classes+' '+reportClasses unless reporttag.css_classes.nil?
  }
  %>
<table>
  <tr>
  <% for column in Report.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
    <th>Tag(s)</th>
  </tr>
  <tr>
  <% for column in Report.content_columns %>
    <td><%=h @report.send(column.name) %></td>
  <% end %>
    <td>
    <% @report.reporttags.each { |reporttag| %>
        <a class="<%= reportClasses %>" href="<%= url_for(:controller=>"reporttags", :action=>"show",:id=>reporttag.id) %>">
          <%=h reporttag.name %>
        </a>
    <%}%>
  </tr>
</table>

<%= link_to 'Edit', edit_report_path(@report) %> |
<%= link_to 'Back', reports_path %>
